/*
 * wchar.h
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is a part of the clang port package.
 * No warranty is given; refer to the file DISCLAIMER within the package.
 *
 * Defines of all functions for supporting wide characters. Actually it
 * just includes all those headers, which is not a good thing to do from a
 * processing time point of view, but it does mean that everything will be
 * in sync.
 *
 */

#ifndef	_CLANG_PORT_WCHAR_H_
#define	_CLANG_PORT_WCHAR_H_

/* All the headers include this file. */
#ifndef __IMPL_CLANG_PORT_API_
#	include <_clang_port.h>
#	include <stdio.h>
#else
#	include <include/_clang_port.h>
#	include <include/stdio.h>
#endif

#include <stddef.h>
#include <stdarg.h>

#ifndef __IMPL_CLANG_PORT_API_

#define __VALIST __builtin_va_list

#define WCHAR_MIN	0
#define WCHAR_MAX	0xffff

#define	WEOF	(wchar_t)(0xFFFF)

typedef int mbstate_t;

#endif // __IMPL_CLANG_PORT_API_

#ifdef __cplusplus
extern "C" {
#endif


/* 
 * Clang port Api.
*/
	typedef int CLANG_PORT_FPTR_TYPE(fwprintf )(FILE*, const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(fwprintf);
	typedef int CLANG_PORT_FPTR_TYPE(wprintf )(const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(wprintf);
	typedef int CLANG_PORT_FPTR_TYPE(snwprintf )(wchar_t*, size_t, const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(snwprintf);
	typedef int CLANG_PORT_FPTR_TYPE(vfwprintf )(FILE*, const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(vfwprintf);
	typedef int CLANG_PORT_FPTR_TYPE(vswprintf )(wchar_t * , size_t ,const wchar_t * , ...);
	extern CLANG_PORT_FPTR_VAR(vswprintf);
	typedef int CLANG_PORT_FPTR_TYPE(vwprintf )(const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(vwprintf);
	typedef int CLANG_PORT_FPTR_TYPE(vsnwprintf )(wchar_t*, size_t, const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(vsnwprintf);
	typedef int CLANG_PORT_FPTR_TYPE(fwscanf )(FILE*, const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(fwscanf);
	typedef int CLANG_PORT_FPTR_TYPE(wscanf )(const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(wscanf);
	typedef int CLANG_PORT_FPTR_TYPE(swscanf )(const wchar_t*, const wchar_t*, ...);
	extern CLANG_PORT_FPTR_VAR(swscanf);
	typedef int CLANG_PORT_FPTR_TYPE(swprintf )(wchar_t *s, size_t n, const wchar_t *format, ...);
	extern CLANG_PORT_FPTR_VAR(swprintf);
	typedef int CLANG_PORT_FPTR_TYPE(vfwscanf )(FILE *__restrict__ stream, const wchar_t *__restrict__ format,...);
	extern CLANG_PORT_FPTR_VAR(vfwscanf);
	typedef int CLANG_PORT_FPTR_TYPE(vswscanf )(const wchar_t *__restrict__ ws, const wchar_t *__restrict__ format,...);
	extern CLANG_PORT_FPTR_VAR(vswscanf);
	typedef int CLANG_PORT_FPTR_TYPE(vwscanf )(const wchar_t *__restrict__ format, ...);
	extern CLANG_PORT_FPTR_VAR(vwscanf);
	typedef wint_t CLANG_PORT_FPTR_TYPE(fgetwc )(FILE*);
	extern CLANG_PORT_FPTR_VAR(fgetwc);
	typedef wint_t CLANG_PORT_FPTR_TYPE(fputwc )(wchar_t, FILE*);
	extern CLANG_PORT_FPTR_VAR(fputwc);
	typedef wint_t CLANG_PORT_FPTR_TYPE(ungetwc )(wchar_t, FILE*);
	extern CLANG_PORT_FPTR_VAR(ungetwc);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE(fgetws)(wchar_t *__restrict__ ws, int n, FILE *__restrict__ stream);
	extern CLANG_PORT_FPTR_VAR(fgetws);
	typedef int CLANG_PORT_FPTR_TYPE(fputws)(const wchar_t *__restrict__ ws, FILE *__restrict__ stream);
	extern CLANG_PORT_FPTR_VAR(fputws);
	typedef int CLANG_PORT_FPTR_TYPE(fwide)(FILE *stream, int mode);
	extern CLANG_PORT_FPTR_VAR(fwide);
	typedef wint_t CLANG_PORT_FPTR_TYPE(getwc)(FILE *stream);
	extern CLANG_PORT_FPTR_VAR(getwc);
	typedef wint_t CLANG_PORT_FPTR_TYPE(getwchar)(void);
	extern CLANG_PORT_FPTR_VAR(getwchar);
	typedef wint_t CLANG_PORT_FPTR_TYPE(putwc)(wchar_t wc, FILE *stream);
	extern CLANG_PORT_FPTR_VAR(putwc);
	typedef wint_t CLANG_PORT_FPTR_TYPE(putwchar)(wchar_t wc);
	extern CLANG_PORT_FPTR_VAR(putwchar);
	
	typedef long CLANG_PORT_FPTR_TYPE( 	wcstol )(const wchar_t*, wchar_t**, int);
	extern CLANG_PORT_FPTR_VAR(wcstol);
	typedef long long CLANG_PORT_FPTR_TYPE(wcstoll)(const wchar_t* ,wchar_t** , int );
	extern CLANG_PORT_FPTR_VAR(wcstoll);
	typedef unsigned long CLANG_PORT_FPTR_TYPE( wcstoul )(const wchar_t*, wchar_t**, int);
	extern CLANG_PORT_FPTR_VAR(wcstoul);
	typedef unsigned long long CLANG_PORT_FPTR_TYPE( wcstoull )(const wchar_t*, wchar_t**, int);
	extern CLANG_PORT_FPTR_VAR(wcstoull);
	typedef double CLANG_PORT_FPTR_TYPE(wcstod )(const wchar_t*, wchar_t**);
	extern CLANG_PORT_FPTR_VAR(wcstod);
	typedef float CLANG_PORT_FPTR_TYPE(wcstof )(const wchar_t*, wchar_t**);
	extern CLANG_PORT_FPTR_VAR(wcstof);
	typedef long double CLANG_PORT_FPTR_TYPE(wcstold )(const wchar_t*, wchar_t**);
	extern CLANG_PORT_FPTR_VAR(wcstold);
	
	typedef size_t CLANG_PORT_FPTR_TYPE(wcsftime )(wchar_t*, size_t, const wchar_t*, const struct tm*);
	extern CLANG_PORT_FPTR_VAR(wcsftime);
	
	
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcscat )(wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcscat);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcschr )(const wchar_t*, wchar_t);
	extern CLANG_PORT_FPTR_VAR(wcschr);
	typedef int CLANG_PORT_FPTR_TYPE(wcscmp )(const wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcscmp);
	typedef int CLANG_PORT_FPTR_TYPE(wcscoll )(const wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcscoll);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcscpy )(wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcscpy);
	typedef size_t CLANG_PORT_FPTR_TYPE(wcscspn )(const wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcscspn);
	typedef size_t CLANG_PORT_FPTR_TYPE(wcslen )(const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcslen);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcsncat )(wchar_t*, const wchar_t*, size_t);
	extern CLANG_PORT_FPTR_VAR(wcsncat);
	typedef int CLANG_PORT_FPTR_TYPE(wcsncmp)(const wchar_t*, const wchar_t*, size_t);
	extern CLANG_PORT_FPTR_VAR(wcsncmp);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcsncpy)(wchar_t*, const wchar_t*, size_t);
	extern CLANG_PORT_FPTR_VAR(wcsncpy);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcspbrk)(const wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcspbrk);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcsrchr)(const wchar_t*, wchar_t);
	extern CLANG_PORT_FPTR_VAR(wcsrchr);
	typedef size_t CLANG_PORT_FPTR_TYPE(wcsspn)(const wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcsspn);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcsstr)(const wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcsstr);
	typedef wchar_t* CLANG_PORT_FPTR_TYPE( wcstok)(wchar_t*, const wchar_t*);
	extern CLANG_PORT_FPTR_VAR(wcstok);
	typedef size_t CLANG_PORT_FPTR_TYPE(wcsxfrm)(wchar_t*, const wchar_t*, size_t);
	extern CLANG_PORT_FPTR_VAR(wcsxfrm);
	
	typedef int CLANG_PORT_FPTR_TYPE(wmemcmp)(const wchar_t *ws1, const wchar_t *ws2, size_t n);
	extern CLANG_PORT_FPTR_VAR(wmemcmp);
	typedef wchar_t *CLANG_PORT_FPTR_TYPE(wmemcpy)(wchar_t *__restrict__ ws1, const wchar_t *__restrict__ ws2,size_t n);
	extern CLANG_PORT_FPTR_VAR(wmemcpy);
	typedef wchar_t *CLANG_PORT_FPTR_TYPE(wmemmove)(wchar_t *ws1, const wchar_t *ws2, size_t n);
	extern CLANG_PORT_FPTR_VAR(wmemmove);
	typedef wchar_t *CLANG_PORT_FPTR_TYPE(wmemset)(wchar_t *ws, wchar_t wc, size_t n);
	extern CLANG_PORT_FPTR_VAR(wmemset);
	typedef wchar_t *CLANG_PORT_FPTR_TYPE(wmemchr)(const wchar_t *ws, wchar_t wc, size_t n);
	extern CLANG_PORT_FPTR_VAR(wmemchr);
	
	
	typedef int CLANG_PORT_FPTR_TYPE( mbsinit)(const mbstate_t *);
	extern CLANG_PORT_FPTR_VAR(mbsinit);
	typedef wint_t CLANG_PORT_FPTR_TYPE( btowc)(int);
	extern CLANG_PORT_FPTR_VAR(btowc);
	typedef size_t CLANG_PORT_FPTR_TYPE( mbrlen)(const char * __restrict__, size_t, mbstate_t * __restrict__);
	extern CLANG_PORT_FPTR_VAR(mbrlen);

	typedef size_t CLANG_PORT_FPTR_TYPE( mbrtowc)(wchar_t * __restrict__, const char * __restrict__, size_t, mbstate_t * __restrict__);
	extern CLANG_PORT_FPTR_VAR(mbrtowc);
	typedef size_t CLANG_PORT_FPTR_TYPE( mbsrtowcs)(wchar_t * __restrict__, const char ** __restrict__, size_t, mbstate_t * __restrict__);
	extern CLANG_PORT_FPTR_VAR(mbsrtowcs);
	typedef size_t CLANG_PORT_FPTR_TYPE( wcrtomb)(char * __restrict__, wchar_t, mbstate_t * __restrict__);
	extern CLANG_PORT_FPTR_VAR(wcrtomb);
	typedef size_t CLANG_PORT_FPTR_TYPE( wcsrtombs)(char * __restrict__, const wchar_t ** __restrict__, size_t, mbstate_t * __restrict__);
	extern CLANG_PORT_FPTR_VAR(wcsrtombs);
	typedef int CLANG_PORT_FPTR_TYPE( wctob)(wint_t);
	extern CLANG_PORT_FPTR_VAR(wctob);


#ifndef __IMPL_CLANG_PORT_API_
/*
 * STD C Api.
 */
CLANG_PORT_INLINE int 	fwprintf (FILE* pf, const wchar_t* format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(fwprintf)(pf,format,vals);
}
CLANG_PORT_INLINE int 	wprintf (const wchar_t* format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(wprintf)(format,vals);
}
CLANG_PORT_INLINE int 	snwprintf (wchar_t* buff, size_t size, const wchar_t * format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(snwprintf)(buff,size,format,vals);
}
CLANG_PORT_INLINE int 	vfwprintf (FILE * pf, const wchar_t* format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(vfwprintf)(pf,format,vals);
}
CLANG_PORT_INLINE int  vswprintf(wchar_t *__restrict__ buff, size_t size,const wchar_t *__restrict__ format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(vswprintf)(buff,size,format,vals);
}

CLANG_PORT_INLINE int 	vwprintf (const wchar_t* format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(vwprintf)(format,vals);
}
CLANG_PORT_INLINE int 	vsnwprintf (wchar_t* buff, size_t size, const wchar_t* format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(vsnwprintf)(buff,size,format,vals);
}
CLANG_PORT_INLINE int 	fwscanf (FILE* pf, const wchar_t* format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(fwscanf)(pf,format,vals);
}
CLANG_PORT_INLINE int 	wscanf (const wchar_t* format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(wscanf)(format,vals);
}
CLANG_PORT_INLINE int 	swscanf (const wchar_t* buff, const wchar_t* format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(swscanf)(buff,format,vals);
}
CLANG_PORT_INLINE int  swprintf(wchar_t *buff, size_t n, const wchar_t *format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(swprintf)(buff,n,format,vals);
}
CLANG_PORT_INLINE int  vfwscanf(FILE *__restrict__ stream, const wchar_t *__restrict__ format,...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(vfwscanf)(stream,format,vals);
}
CLANG_PORT_INLINE int  vswscanf(const wchar_t *__restrict__ ws, const wchar_t *__restrict__ format,...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(vswscanf)(ws,format,vals);
}
CLANG_PORT_INLINE int  vwscanf(const wchar_t *__restrict__ format, ...)
{
	__VALIST vals;va_start( vals, format );
	return CLANG_PORT_CALL_FPTR(vwscanf)(format,vals);
}
CLANG_PORT_INLINE wint_t 	fgetwc (FILE* pf)
{
	return CLANG_PORT_CALL_FPTR(fgetwc)(pf);
}
CLANG_PORT_INLINE wint_t 	fputwc (wchar_t c, FILE* pf)
{
	return CLANG_PORT_CALL_FPTR(fputwc)(c,pf);
}
CLANG_PORT_INLINE wint_t 	ungetwc (wchar_t c, FILE* pf)
{
	return CLANG_PORT_CALL_FPTR(ungetwc)(c,pf);
}

CLANG_PORT_INLINE wchar_t  *fgetws(wchar_t *__restrict__ ws, int n, FILE *__restrict__ stream)
{
	return CLANG_PORT_CALL_FPTR(fgetws)(ws,n,stream);
}
CLANG_PORT_INLINE int  fputws(const wchar_t *__restrict__ ws, FILE *__restrict__ stream)
{
	return CLANG_PORT_CALL_FPTR(fputws)(ws,stream);
}
CLANG_PORT_INLINE int  fwide(FILE *stream, int mode)
{
	return CLANG_PORT_CALL_FPTR(fwide)(stream,mode);
}
CLANG_PORT_INLINE wint_t  getwc(FILE *stream)
{
	return CLANG_PORT_CALL_FPTR(getwc)(stream);
}
CLANG_PORT_INLINE wint_t  getwchar(void)
{
	return CLANG_PORT_CALL_FPTR(getwchar)();
}
CLANG_PORT_INLINE wint_t  putwc(wchar_t wc, FILE *stream)
{
	return CLANG_PORT_CALL_FPTR(putwc)(wc,stream);
}
CLANG_PORT_INLINE wint_t  putwchar(wchar_t wc)
{
	return CLANG_PORT_CALL_FPTR(putwchar)(wc);
}

CLANG_PORT_INLINE long  	wcstol (const wchar_t* ptr, wchar_t** out, int size)
{
	return CLANG_PORT_CALL_FPTR(wcstol)(ptr,out,size);
}
CLANG_PORT_INLINE long long  wcstoll(const wchar_t* ptr, wchar_t** out, int size)
{
	return CLANG_PORT_CALL_FPTR(wcstoll)(ptr,out,size);
}
CLANG_PORT_INLINE unsigned long  wcstoul (const wchar_t* ptr, wchar_t** out, int size)
{
	return CLANG_PORT_CALL_FPTR(wcstoul)(ptr,out,size);
}
CLANG_PORT_INLINE unsigned long long  wcstoull (const wchar_t* ptr, wchar_t** out, int size)
{
	return CLANG_PORT_CALL_FPTR(wcstoull)(ptr,out,size);
}
CLANG_PORT_INLINE double 	wcstod (const wchar_t* ptr, wchar_t** out)
{
	return CLANG_PORT_CALL_FPTR(wcstod)(ptr,out);
}
CLANG_PORT_INLINE float  wcstof (const wchar_t* ptr, wchar_t** out)
{
	return CLANG_PORT_CALL_FPTR(wcstof)(ptr,out);
}
CLANG_PORT_INLINE long double  wcstold (const wchar_t* ptr, wchar_t** out)
{
	return CLANG_PORT_CALL_FPTR(wcstold)(ptr,out);
}

CLANG_PORT_INLINE size_t 	wcsftime (wchar_t* ptr, size_t size, const wchar_t* format, const struct tm* t)
{
	return CLANG_PORT_CALL_FPTR(wcsftime)(ptr,size,format,t);
}


CLANG_PORT_INLINE wchar_t*  wcscat (wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcscat)(src,dst);
}
CLANG_PORT_INLINE wchar_t*  wcschr (const wchar_t* src, wchar_t dst)
{
	return CLANG_PORT_CALL_FPTR(wcschr)(src,dst);
}
CLANG_PORT_INLINE int 	wcscmp (const wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcscmp)(src,dst);
}
CLANG_PORT_INLINE int 	wcscoll (const wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcscoll)(src,dst);
}
CLANG_PORT_INLINE wchar_t*  wcscpy (wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcscpy)(src,dst);
}
CLANG_PORT_INLINE size_t 	wcscspn (const wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcscspn)(src,dst);
}
CLANG_PORT_INLINE size_t 	wcslen (const wchar_t* src)
{
	return CLANG_PORT_CALL_FPTR(wcslen)(src);
}
CLANG_PORT_INLINE wchar_t*  wcsncat (wchar_t* src, const wchar_t* dst, size_t size)
{
	return CLANG_PORT_CALL_FPTR(wcsncat)(src,dst,size);
}
CLANG_PORT_INLINE int 	wcsncmp(const wchar_t* src, const wchar_t* dst, size_t size)
{
	return CLANG_PORT_CALL_FPTR(wcsncmp)(src,dst,size);
}
CLANG_PORT_INLINE wchar_t*  wcsncpy(wchar_t* src, const wchar_t* dst, size_t size)
{
	return CLANG_PORT_CALL_FPTR(wcsncpy)(src,dst,size);
}
CLANG_PORT_INLINE wchar_t*  wcspbrk(const wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcspbrk)(src,dst);
}
CLANG_PORT_INLINE wchar_t*  wcsrchr(const wchar_t* src, wchar_t dst)
{
	return CLANG_PORT_CALL_FPTR(wcsrchr)(src,dst);
}
CLANG_PORT_INLINE size_t 	wcsspn(const wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcsspn)(src,dst);
}
CLANG_PORT_INLINE wchar_t*  wcsstr(const wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcsstr)(src,dst);
}
CLANG_PORT_INLINE wchar_t*  wcstok(wchar_t* src, const wchar_t* dst)
{
	return CLANG_PORT_CALL_FPTR(wcstok)(src,dst);
}
CLANG_PORT_INLINE size_t 	wcsxfrm(wchar_t* src, const wchar_t* dst, size_t size)
{
	return CLANG_PORT_CALL_FPTR(wcsxfrm)(src,dst,size);
}
CLANG_PORT_INLINE int  wmemcmp(const wchar_t *ws1, const wchar_t *ws2, size_t n)
{
	return CLANG_PORT_CALL_FPTR(wmemcmp)(ws1,ws2,n);
}
CLANG_PORT_INLINE wchar_t *  wmemcpy(wchar_t *__restrict__ ws1, const wchar_t *__restrict__ ws2,size_t n)
{
	return CLANG_PORT_CALL_FPTR(wmemcpy)(ws1,ws2,n);
}
CLANG_PORT_INLINE wchar_t *  wmemmove(wchar_t *ws1, const wchar_t *ws2, size_t n)
{
	return CLANG_PORT_CALL_FPTR(wmemmove)(ws1,ws2,n);
}
CLANG_PORT_INLINE wchar_t *  wmemset(wchar_t *ws, wchar_t wc, size_t n)
{
	return CLANG_PORT_CALL_FPTR(wmemset)(ws,wc,n);
}
CLANG_PORT_INLINE wchar_t *  wmemchr(const wchar_t *ws, wchar_t wc, size_t n)
{
	return CLANG_PORT_CALL_FPTR(wmemchr)(ws,wc,n);
}


typedef int mbstate_t;

CLANG_PORT_INLINE int mbsinit(const mbstate_t *ps)
{
	return CLANG_PORT_CALL_FPTR(mbsinit)(ps);
}
CLANG_PORT_INLINE wint_t  btowc(int i)
{
	return CLANG_PORT_CALL_FPTR(btowc)(i);
}
CLANG_PORT_INLINE size_t  mbrlen(const char * __restrict__ dst, size_t len, mbstate_t * __restrict__ ps)
{
	return CLANG_PORT_CALL_FPTR(mbrlen)(dst,len,ps);
}
CLANG_PORT_INLINE size_t  mbrtowc(wchar_t * __restrict__ dst, const char * __restrict__ src , size_t len, mbstate_t * __restrict__ ps)
{
	return CLANG_PORT_CALL_FPTR(mbrtowc)(dst,src,len,ps);
}
CLANG_PORT_INLINE size_t  mbsrtowcs(wchar_t * __restrict__ dst, const char ** __restrict__ src, size_t len, mbstate_t * __restrict__ ps)
{
	return CLANG_PORT_CALL_FPTR(mbsrtowcs)(dst,src,len,ps);
}
CLANG_PORT_INLINE size_t  wcrtomb(char * __restrict__ dst, wchar_t src,
		       mbstate_t * __restrict__ ps)
{
	return CLANG_PORT_CALL_FPTR(wcrtomb)(dst,src,ps);
}
CLANG_PORT_INLINE size_t  wcsrtombs(char * __restrict__ dst, const wchar_t ** __restrict__ src , size_t len, mbstate_t * __restrict__ ps)
{
	return CLANG_PORT_CALL_FPTR(wcsrtombs)(dst,src,len,ps);
}
CLANG_PORT_INLINE int  wctob(wint_t i)
{
	return CLANG_PORT_CALL_FPTR(wctob)(i);
}


#endif /* __IMPL_CLANG_PORT_API_ */

#ifdef __cplusplus
}	/* end of extern "C" */
#endif


#endif /* not _CLANG_PORT_WCHAR_H_ */

